{% extends 'home.html' %}
{% block content %}

<head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>电导率仪校准</title>
        <link href="/static/css/kfc_yb.css" rel="stylesheet">
    </link>
        <script src="/static/bootstrap/js/jquery.min.js" type="text/javascript"></script>
        <script src="/static/js/ddl.js" type="text/javascript"></script>
    </head>
        <style>
            /* 保留其他样式不变 */
            table#tools input,
            table#tools select {
                width: 95% !important;
            }
        </style>
    </head>

<body>
    <form name="form1" method="post" id="form1">
        {% csrf_token %}
        <div class="c-layout-page">
            <div class="c-content-box c-size-md c-bg-white">
                <div class="container">
                    <div class="c-content-title-1">
                        <h3 class="c-center c-font-dark c-font-uppercase">新增DDL校准记录</h3>
                        <div class="c-line-center c-theme-bg"></div>
                        <p class="c-center"></p>
                    </div>
                    <div class="c-content-panel">
                        <div class="c-label">DDL基础信息输入</div>
                        <div class="c-body">
                            <div class="row">
                                <div class="col-md-12">
                                    <table class="table" id="tools">                                                                              
                                        <tbody>
                                            <tr>
                                                <th style="text-align:center">仪器名称</th>
                                                <td><input name="A1PH_Name01" type="text" value="电导率仪" id="A1PH_Name01" style="height:25px"></td>
                                                <th style="text-align:center">仪器接收编号</th>
                                                <td colspan="4"><input name="A1PH_Received02" type="text"
                                                                   value="{{ A1PH_Received02 }}" readonly="readonly"
                                                                   id="A1PH_Received02"
                                                                   style="background-color:#F3F3F3;height:25px; width:380px">
                                            </td>
                                            </tr>
                                            <tr>
                                                <th style="text-align:center">型号/规格</th>
                                                <td><input name="A1PH_ProdModel03" type="text" id="A1PH_ProdModel03" style="height:25px"></td>
                                                <th style="text-align:center">仪器序列号</th>
                                                <td><input name="A1PH_SN04" type="text" id="A1PH_SN04" style="height:25px"></td>
                                                <th style="text-align:center">模块系列号(如有)</th>
                                                <td colspan="2"><input name="A1PH_Model05" type="text" id="A1PH_Model05" style="width:140px;height:25px"></td>
                                            </tr>
                                            <tr>
                                                <th style="text-align:center">校准依据</th>
                                                <td><input name="A1PH_Xz06" type="text" value="JJG 376-2007" id="A1PH_Xz06" style="height:25px"></td>
                                                <th style="text-align:center">校准日期</th>
                                                <td>
                                                    <input name="A1PH_Rq07" type="text" value="{{ date }}"
                                                        readonly="readonly" id="A1PH_Rq07"
                                                        style="background-color: #f3f3f3; height: 25px; width: 120px" />
                                                </td>
                                                <th style="text-align:center">仪器级别</th>
                                                <td colspan="2">
                                                    <select name="A1PH_Level08" id="A1PH_Level08" style="height:33px;width:100%;">
                                                        <option value="0">---请选择---</option>
                                                        <option value="0.5">0.5</option>
                                                    </select>
                                                </td>
                                            </tr>
                                            <tr>
                                                <th style="text-align:center">电极型号</th>
                                                <td><input name="A1PH_LC09" type="text" value="/" id="A1PH_LC09" style="width:165px;height:25px"></td>
                                                <th style="text-align:center">电极序列号</th>
                                                <td><input name="A1PH_Dy10" type="text" value="/" id="A1PH_Dy10" style="width:165px;height:25px"></td>
                                                <th style="text-align:center">环境条件</th>                        
                                                <td>
                                                    <input name="A1PH_Wd11" type="text" id="A1PH_Wd11"
                                                        style="height:25px; width:45px !important;"
                                                        onblur="formatToOneDecimal(this)">&nbsp;°C &nbsp;&nbsp;
                                                    <input name="A1PH_Sd12" type="text" id="A1PH_Sd12"
                                                        style="height:25px; width:45px !important;"
                                                        onblur="formatToOneDecimal(this)">&nbsp;%RH
                                                    <script>
                                                        function formatToOneDecimal(inputElement) {
                                                            if (inputElement.value !== '') {
                                                                const value = parseFloat(inputElement.value);
                                                                if (!isNaN(value)) {
                                                                    inputElement.value = value.toFixed(1);
                                                                }
                                                            }
                                                        }

                                                        // 页面加载时也格式化已有的值
                                                        document.addEventListener('DOMContentLoaded', function () {
                                                            formatToOneDecimal(document.getElementById('A1PH_Wd11'));
                                                            formatToOneDecimal(document.getElementById('A1PH_Sd12'));
                                                        });
                                                    </script>
                                                </td>
                                            </tr>
                                            <tr>

                                                <td colspan="6" style="height:0.5px"></td>
                                            </tr>

                                            
                                            <tr>

                                                <th style="text-align:center">名称/型号</th>
                                                <th style="text-align:center">编号</th>
                                                <th style="text-align:center">计量标准证书编号</th>
                                                <th style="text-align:center">有效期</th>
                                                <th style="text-align:center">校准机构</th>
                                                <th style="text-align:center">准确度等级</th>
                                            </tr>
                                            <tr>
                                                <td><input name="BLPH_Xmxh16" type="text" value="/" id="BLPH_Xmxh16"
                                                        style="height:25px;"></td>
                                                <td><select name="BLPH_Bh17" id="BLPH_Bh17"
                                                        style="height:30px;width:107px;">
                                                        <option selected="selected" value="0">==请选择==
                                                        </option>
                                                        {% for tool in tools %}
                                                        <option value="{{ tool.tool_number }}">
                                                            {{tool.tool_number}}</option>
                                                        {% endfor %}

                                                    </select></td>
                                                <td><input name="BLPH_Jlzsbh18" type="text" id="BLPH_Jlzsbh18" value="/"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Yxrq19" type="text" id="BLPH_Yxrq19" value="/"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Yzjg20" type="text" value="/" id="BLPH_Yzjg20"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Zqddj21" type="text" value="/" id="BLPH_Zqddj21"
                                                        style="width:140px;height:25px"></td>

                                            </tr>
                                            <tr>
                                                <td><input name="BLPH_Xmxh22" type="text" value="/" id="BLPH_Xmxh22"
                                                        style="height:25px"></td>
                                                <td><select name="BLPH_Bh23" type="text" value="/" id="BLPH_Bh23"
                                                        style="height:25px"><option selected="selected" value="0">==请选择==
                                                        </option>
                                                        {% for tool in tools %}
                                                        <option value="{{ tool.tool_number }}">
                                                            {{tool.tool_number}}</option>
                                                        {% endfor %}

                                                    </select></td>
                                                <td><input name="BLPH_Jlzsbh24" type="text" value="/" id="BLPH_Jlzsbh24"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Yxrq25" type="text" value="/" id="BLPH_Yxrq25"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Yzjg26" type="text" value="/" id="BLPH_Yzjg26"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Zqddj27" type="text" value="/" id="BLPH_Zqddj27"
                                                        style="width:140px;height:25px"></td>

                                            </tr>
                                            <tr>
                                                <td><input name="BLPH_Xmxh28" type="text" value="/" id="BLPH_Xmxh28"
                                                        style="height:25px"></td>
                                                <td><select name="BLPH_Bh29" type="text" value="/" id="BLPH_Bh29"
                                                        style="height:25px"><option selected="selected" value="0">==请选择==
                                                        </option>
                                                        {% for tool in tools %}
                                                        <option value="{{ tool.tool_number }}">
                                                            {{tool.tool_number}}</option>
                                                        {% endfor %}

                                                    </select></td>
                                                <td><input name="BLPH_Jlzsbh30" type="text" value="/" id="BLPH_Jlzsbh30"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Yxrq31" type="text" value="/" id="BLPH_Yxrq31"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Yzjg32" type="text" value="/" id="BLPH_Yzjg32"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Zqddj33" type="text" value="/" id="BLPH_Zqddj33"
                                                        style="width:140px;height:25px"></td>

                                            </tr>
                                            <tr>
                                                <td><input name="BLPH_Xmxh34" type="text" value="/" id="BLPH_Xmxh34"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Bh35" type="text" value="/" id="BLPH_Bh35"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Jlzsbh36" type="text" value="/" id="BLPH_Jlzsbh36"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Yxrq37" type="text" value="/" id="BLPH_Yxrq37"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Yzjg38" type="text" value="/" id="BLPH_Yzjg38"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Zqddj39" type="text" value="/" id="BLPH_Zqddj39"
                                                        style="width:140px;height:25px"></td>

                                            </tr>
                                            <tr>
                                                <td><input name="BLPH_Xmxh40" type="text" value="/" id="BLPH_Xmxh40"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Bh41" type="text" value="/" id="BLPH_Bh41"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Jlzsbh42" type="text" value="/" id="BLPH_Jlzsbh42"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Yxrq43" type="text" value="/" id="BLPH_Yxrq43"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Yzjg44" type="text" value="/" id="BLPH_Yzjg44"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Zqddj45" type="text" value="/" id="BLPH_Zqddj45"
                                                        style="width:140px;height:25px"></td>

                                            </tr>
                                            <tr>
                                                <td><input name="BLPH_Xmxh46" type="text" value="/" id="BLPH_Xmxh46"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Bh47" type="text" value="/" id="BLPH_Bh47"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Jlzsbh48" type="text" value="/" id="BLPH_Jlzsbh48"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Yxrq49" type="text" value="/" id="BLPH_Yxrq49"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Yzjg50" type="text" value="/" id="BLPH_Yzjg50"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Zqddj51" type="text" value="/" id="BLPH_Zqddj51"
                                                        style="width:140px;height:25px"></td>

                                            </tr>
                                            <tr>
                                                <td><input name="BLPH_Xmxh52" type="text" value="/" id="BLPH_Xmxh52"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Bh53" type="text" value="/" id="BLPH_Bh53"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Jlzsbh54" type="text" value="/" id="BLPH_Jlzsbh54"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Yxrq55" type="text" value="/" id="BLPH_Yxrq55"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Yzjg56" type="text" value="/" id="BLPH_Yzjg56"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Zqddj57" type="text" value="/" id="BLPH_Zqddj57"
                                                        style="width:140px;height:25px"></td>

                                            </tr>
                                            <tr>
                                                <td><input name="BLPH_Xmxh58" type="text" value="/" id="BLPH_Xmxh58"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Bh59" type="text" value="/" id="BLPH_Bh59"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Jlzsbh60" type="text" value="/" id="BLPH_Jlzsbh60"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Yxrq61" type="text" value="/" id="BLPH_Yxrq61"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Yzjg62" type="text" value="/" id="BLPH_Yzjg62"
                                                        style="height:25px"></td>
                                                <td><input name="BLPH_Zqddj63" type="text" value="/" id="BLPH_Zqddj63"
                                                        style="width:140px;height:25px"></td>

                                            </tr>




                                            <tr>
                                                <td>生产厂商</td>
                                                <td colspan="5"><input name="A1PH_Sccs52" type="text" id="A1PH_Sccs52"
                                                        style="width:920px;height:25px"></td>


                                            </tr>
                                            <tr>
                                                <td>证书单位</td>
                                                <td colspan="5"><input name="A1PH_Zsdw53" type="text" id="A1PH_Zsdw53"
                                                        style="width:920px;height:25px"></td>


                                            </tr>
                                            <tr>
                                                <td>证书地址</td>
                                                <td colspan="5"><input name="A1PH_Zsdz54" type="text" id="A1PH_Zsdz54"
                                                        style="width:920px;height:25px"></td>


                                            </tr>
                                            <tr>
                                                <td>校准地点</td>
                                                <td colspan="5"><input name="A1PH_Xzdd55" type="text" id="A1PH_Xzdd55"
                                                        style="width:920px;height:25px"></td>


                                            </tr>

                                            <tr>
                                                <td>外观检查：</td>
                                                <td colspan="2">符合 <input id="A1PH_Wgjcfh56" type="checkbox"
                                                                            name="A1PH_Wgjcfh56" style="width:20px !important;"></td>
                                                <td colspan="3">不符合 <input id="A1PH_Wgjcbfh57" type="checkbox"
                                                                            name="A1PH_Wgjcbfh57" style="width:20px !important;"></td>
                                            </tr>

                                            <!-- 修改校准项目部分 -->
                                            <tr>
                                                <td><span style="color: red;">*</span>校准项目：</td>
                                                <td colspan="2">
                                                        电计示值误差 <input id="A1PH_Jzxm_0" type="checkbox" name="A1PH_Jzxm" value="0" 
                                                        onclick="handleCalibrationSelection(0)" style="width:20px !important;" checked>
                                                </td>
                                                <td colspan="3">
                                                        整机示值误差 <input id="A1PH_Jzxm_1" type="checkbox" name="A1PH_Jzxm" value="1" 
                                                        onclick="handleCalibrationSelection(1)" style="width:20px !important;">
                                                </td>
                                                <!-- 在校准项目部分附近添加隐藏字段 -->
                                                <input type="hidden" id="A1PH_Jzxm_hidden" name="A1PH_Jzxm" value="0">
                                             </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="c-content-panel">
                        <div class="c-label">1.1 电子单元重复性</div>
                        <div class="c-body">
                            <div class="row">
                                <div class="col-md-12">
                                    <table class="table">

                                        <tbody>
                                            <tr>
                                                <th rowspan="2" style="text-align: center;">标准电导率<br>ks</th>
                                                <th rowspan="2" style="text-align: center;">量程上限值<br>Kf</th>
                                                <th colspan="6">仪器测量值KM</th>
                                                <th rowspan="2" style="text-align: center;">测量平均值<br>kM</th>
                                                <th rowspan="2" style="text-align: center;">标准偏差<br>S</th>
                                                <th rowspan="2" style="text-align: center;">标准偏差<br>S/kF (%FS)</th>

                                            </tr>
                                            <tr>
                                                <td>1</td>
                                                <td>2</td>
                                                <td>3</td>
                                                <td>4</td>
                                                <td>5</td>
                                                <td>6</td>

                                            </tr>
                                            <tr>
                                                <td><input name="B0" type="text" id="B0" onkeyup="WupperCase(this)"
                                                        style="width:110px; height:25px;"></td>
                                                <td><input name="B1" type="text" id="B1" onkeyup="WupperCase(this)"
                                                        style="width:100px; height:25px"> </td>
                                                <td><input name="B2" type="text" id="B2" onkeyup="WupperCase(this)"
                                                        style="width:50px; height:25px"></td>
                                                <td><input name="B3" type="text" id="B3" onkeyup="WupperCase(this)"
                                                        style="width:50px; height:25px"></td>
                                                <td><input name="B4" type="text" id="B4" onkeyup="WupperCase(this)"
                                                        style="width:50px; height:25px"></td>
                                                <td><input name="B5" type="text" id="B5" onkeyup="WupperCase(this)"
                                                        style="width:50px; height:25px"></td>
                                                <td><input name="B6" type="text" id="B6" onkeyup="WupperCase(this)"
                                                        style="width:50px; height:25px;"></td>
                                                <td><input name="B7" type="text" id="B7" onkeyup="WupperCase(this)"
                                                        style="width:50px; height:25px" onchange="_SetDigitalInput(7);">
                                                </td>
                                                <td><input name="B8" type="text" id="B8" readonly="readonly"
                                                        style="width:100px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="B9" type="text" id="B9" readonly="readonly"
                                                        style="width:100px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="B10" type="text" id="B10" readonly="readonly"
                                                        style="width:110px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="c-content-panel">
                        <div class="c-label">1.2 电子单元引用误差</div>
                        <div class="c-body">
                            <div class="row">
                                <div class="col-md-12">
                                    <table class="table table-bordered">
                                        <caption>
                                                 电子单元引用误差(%FS)：
                                                <input name="C_max" type="text" id="C_max" readonly="readonly" 
                                                    style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                        </caption> 
                                        <tbody>
                                            <tr>
                                                <th>量程上限值kF<br>(μS/cm)</th>
                                                <th>测量点<br>(μS/cm)</th>
                                                <th>仪器测量值kM<br>(μS/cm)</th>
                                                <th>误差△k<br>(μS/cm)</th>
                                                <th>引用误差△k/kF<br>(μS/cm)</th>
                                            </tr>
                                            <tr>
                                                <td><input name="C0" type="text" id="C0" onkeyup="WupperCase(this)"
                                                        style="width:75px; height:25px"></td>
                                                <td><input name="C1" type="text" id="C1" onkeyup="WupperCase(this)"
                                                        style="width:140px; height:25px"></td>
                                                <td><input name="C2" type="text" id="C2" onkeyup="WupperCase(this)"
                                                        onchange="SetDigitalInputC(2);"
                                                        style="width:140px; height:25px"></td>
                                                <td><input name="C3" type="text" id="C3" readonly="readonly"
                                                        style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="C4" type="text" id="C4" readonly="readonly"
                                                        style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                            </tr>
                                            <tr>
                                                <td><input name="C5" type="text" id="C5" onkeyup="WupperCase(this)"
                                                        style="width:75px; height:25px"></td>
                                                <td><input name="C6" type="text" id="C6" onkeyup="WupperCase(this)"
                                                        style="width:140px; height:25px"></td>
                                                <td><input name="C7" type="text" id="C7" onchange="SetDigitalInputC(7);"
                                                        style="width:140px; height:25px"></td>
                                                <td><input name="C8" type="text" id="C8" readonly="readonly"
                                                        style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="C9" type="text" id="C9" readonly="readonly"
                                                        style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                            </tr>
                                            <tr>
                                                <td><input name="C10" type="text" id="C10" onkeyup="WupperCase(this)"
                                                        style="width:75px; height:25px"></td>
                                                <td><input name="C11" type="text" id="C11" onkeyup="WupperCase(this)"
                                                        style="width:140px; height:25px"></td>
                                                <td><input name="C12" type="text" id="C12" onkeyup="WupperCase(this)"
                                                        onchange="SetDigitalInputC(12);"
                                                        style="width:140px; height:25px"></td>
                                                <td><input name="C13" type="text" id="C13" readonly="readonly"
                                                        style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="C14" type="text" id="C14" readonly="readonly"
                                                        style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                            </tr>
                                            <tr>
                                                <td><input name="C15" type="text" id="C15" onkeyup="WupperCase(this)"
                                                        style="width:75px; height:25px"></td>
                                                <td><input name="C16" type="text" id="C16" onkeyup="WupperCase(this)"
                                                        style="width:140px; height:25px"></td>
                                                <td><input name="C17" type="text" id="C17" onkeyup="WupperCase(this)"
                                                        onchange="SetDigitalInputC(17);"
                                                        style="width:140px; height:25px"></td>
                                                <td><input name="C18" type="text" id="C18" readonly="readonly"
                                                        style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="C19" type="text" id="C19" readonly="readonly"
                                                        style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                            </tr>
                                            <tr>

                                                <td><input name="C20" type="text" id="C20" onkeyup="WupperCase(this)"
                                                        style="width:75px; height:25px"></td>
                                                <td><input name="C21" type="text" id="C21" onkeyup="WupperCase(this)"
                                                        style="width:140px; height:25px"></td>
                                                <td><input name="C22" type="text" id="C22" onkeyup="WupperCase(this)"
                                                        onchange="SetDigitalInputC(22);"
                                                        style="width:140px; height:25px"></td>
                                                <td><input name="C23" type="text" id="C23" readonly="readonly"
                                                        style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="C24" type="text" id="C24" readonly="readonly"
                                                        style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                            </tr>
                                            <tr>

                                                <td><input name="C25" type="text" id="C25" onkeyup="WupperCase(this)"
                                                        style="width:75px; height:25px"></td>
                                                <td><input name="C26" type="text" id="C26" onkeyup="WupperCase(this)"
                                                        style="width:140px; height:25px"></td>
                                                <td><input name="C27" type="text" id="C27" onkeyup="WupperCase(this)"
                                                        onchange="SetDigitalInputC(27);"
                                                        style="width:140px; height:25px"></td>
                                                <td><input name="C28" type="text" id="C28" readonly="readonly"
                                                        style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="C29" type="text" id="C29" readonly="readonly"
                                                        style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                            </tr>
                                            <tr>
                                                <td><input name="C30" type="text" id="C30" onkeyup="WupperCase(this)"
                                                        style="width:75px; height:25px"></td>
                                                <td><input name="C31" type="text" id="C31" onkeyup="WupperCase(this)"
                                                        style="width:140px; height:25px"></td>
                                                <td><input name="C32" type="text" id="C32" onkeyup="WupperCase(this)"
                                                        onchange="SetDigitalInputC(32);"
                                                        style="width:140px; height:25px"></td>
                                                <td><input name="C33" type="text" id="C33" readonly="readonly"
                                                        style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="C34" type="text" id="C34" readonly="readonly"
                                                        style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                            </tr>
                                            <tr>
                                                <td><input name="C35" type="text" id="C35" onkeyup="WupperCase(this)"
                                                        style="width:75px; height:25px"></td>
                                                <td><input name="C36" type="text" id="C36" onkeyup="WupperCase(this)"
                                                        style="width:140px; height:25px"></td>
                                                <td><input name="C37" type="text" id="C37" onkeyup="WupperCase(this)"
                                                        onchange="SetDigitalInputC(37);"
                                                        style="width:140px; height:25px"></td>
                                                <td><input name="C38" type="text" id="C38" readonly="readonly"
                                                        style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="C39" type="text" id="C39" readonly="readonly"
                                                        style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>

                                            </tr>
                                            <tr>
                                                <td><input name="C55" type="text" id="C55" onkeyup="WupperCase(this)" style="width:75px; height:25px"></td>
                                                <td><input name="C56" type="text" id="C56" onkeyup="WupperCase(this)" style="width:140px; height:25px"></td>
                                                <td><input name="C57" type="text" id="C57" onkeyup="WupperCase(this)" onchange="SetDigitalInputC(57);" style="width:140px; height:25px"></td>
                                                <td><input name="C58" type="text" id="C58" readonly="readonly" style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3"></td>
                                                <td><input name="C59" type="text" id="C59" readonly="readonly" style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3"></td>
                                                 
                                            </tr>   

                                             <tr>
                                                <td><input name="C60" type="text" id="C60" onkeyup="WupperCase(this)" style="width:75px; height:25px"></td>
                                                <td><input name="C61" type="text" id="C61" onkeyup="WupperCase(this)" style="width:140px; height:25px"></td>
                                                <td><input name="C62" type="text" id="C62" onkeyup="WupperCase(this)" onchange="SetDigitalInputC(62);" style="width:140px; height:25px"></td>
                                                <td><input name="C63" type="text" id="C63" readonly="readonly" style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3"></td>
                                                <td><input name="C64" type="text" id="C64" readonly="readonly" style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3"></td>
                                            </tr>
                                            <tr>
                                                <td><input name="C65" type="text" id="C65" onkeyup="WupperCase(this)" style="width:75px; height:25px"></td>
                                                <td><input name="C66" type="text" id="C66" onkeyup="WupperCase(this)" style="width:140px; height:25px"></td>
                                                <td><input name="C67" type="text" id="C67" onkeyup="WupperCase(this)" onchange="SetDigitalInputC(67);" style="width:140px; height:25px"></td>
                                                <td><input name="C68" type="text" id="C68" readonly="readonly" style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3"></td>
                                                <td><input name="C69" type="text" id="C69" readonly="readonly" style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3"></td>
                                            </tr>
                                            <tr>
                                                <td><input name="C70" type="text" id="C70" onkeyup="WupperCase(this)" style="width:75px; height:25px"></td>
                                                <td><input name="C71" type="text" id="C71" onkeyup="WupperCase(this)" style="width:140px; height:25px"></td>
                                                <td><input name="C72" type="text" id="C72" onkeyup="WupperCase(this)" onchange="SetDigitalInputC(72);" style="width:140px; height:25px"></td>
                                                <td><input name="C73" type="text" id="C73" readonly="readonly" style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3"></td>
                                                <td><input name="C74" type="text" id="C74" readonly="readonly" style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3"></td>
                                            </tr>
                                            
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="c-content-panel">
                        <div class="c-label">1.3 电导池常数示值误差</div>
                        <div class="c-body">
                            <div class="row">
                                <div class="col-md-12">
                                    <table class="table table-hover">
                                        <caption>
                                                  电导池常数示值误差(cm<sup>-1</sup>)：
                                                <input name="D_max" type="text" id="D_max" readonly="readonly" 
                                                    style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                        </caption> 
                                        <tbody>
                                            <tr>
                                                <th>KcellR时电导率kMR<br>(μS/cm)</th>
                                                <th>常数标称值KcellV<br>(/cm)</th>
                                                <th>电导率测量值kMV<br>(μS/cm)</th>
                                                <th>常数实际值KcellRkMV/kMR<br>（cm-1)</th>
                                                <th>常数示值误差△Kcell<br>（cm-1)</th>

                                            </tr>

                                            <tr>

                                                <td><input name="D0" type="text" id="D0" onkeyup="WupperCase(this)"
                                                        style="width:140px; height:25px"></td>
                                                <td><input name="D1" type="text" id="D1" value="0.8" readonly="readonly"
                                                        style="width:140px; height:25px;border-width: 0px; font-size:15px; border-style: inset">
                                                </td>
                                                <td><input name="D2" type="text" id="D2" onkeyup="WupperCase(this)"
                                                        onchange="SetDigitalInputD(2);"
                                                        style="width:140px; height:25px"></td>
                                                <td><input name="D3" type="text" id="D3" readonly="readonly"
                                                        style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="D4" type="text" id="D4" readonly="readonly"
                                                        style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>



                                            </tr>
                                            <tr>
                                                <td><input name="D5" type="text" id="D5" onkeyup="WupperCase(this)"
                                                        style="width:140px; height:25px"></td>
                                                <td><input name="D6" type="text" id="D6" value="1.2" readonly="readonly"
                                                        style="width:140px; height:25px;border-width: 0px; font-size:15px; border-style: inset">
                                                </td>
                                                <td><input name="D7" type="text" id="D7" onkeyup="WupperCase(this)"
                                                        onchange="SetDigitalInputD(7);"
                                                        style="width:140px; height:25px"></td>
                                                <td><input name="D8" type="text" id="D8" readonly="readonly"
                                                        style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="D9" type="text" id="D9" readonly="readonly"
                                                        style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>



                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="c-content-panel">
                        <div class="c-label">1.4 温度系数示值误差</div>
                        <div class="c-body">
                            <div class="row">
                                <div class="col-md-12">
                                    <table class="table table-condensed">    
                                        <caption>
                                                  温度系数示值误差(%/℃)：
                                                <input name="E_max" type="text" id="E_max" readonly="readonly" 
                                                    style="width:140px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                        </caption>                                 
                                        <tbody>
                                            <tr>
                                                <th>无温补时的电导率</th>
                                                <th>温度系数</th>
                                                <th>温度示值<br>T(℃)</th>
                                                <th>电导率示值KMV<br>(μS/cm)</th>
                                                <th>温度系数<br>实际值(%)</th>
                                                <th>温度系数<br>示值误差△α(%)</th>
                                            </tr>

                                            <tr>

                                                <td><input name="E0" type="text" id="E0" onkeyup="WupperCase(this)"
                                                        style="width:110px; height:25px"></td>
                                                <td><input name="E1" type="text" id="E1" value="2" readonly="readonly"
                                                        style="width:110px; height:25px;border-width: 0px; font-size:15px; border-style: inset">
                                                </td>
                                                <td><input name="E2" type="text" id="E2" value="15" readonly="readonly"
                                                        style="width:110px; height:25px;border-width: 0px; font-size:15px; border-style: inset">
                                                </td>
                                                <td><input name="E3" type="text" id="E3" onkeyup="WupperCase(this)"
                                                        onchange="SetDigitalInputE(3);"
                                                        style="width:110px; height:25px"></td>
                                                <td><input name="E4" type="text" id="E4" readonly="readonly"
                                                        style="width:110px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="E5" type="text" id="E5" readonly="readonly"
                                                        style="width:110px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>

                                            </tr>
                                            <tr>
                                                <td><input name="E6" type="text" id="E6" onkeyup="WupperCase(this)"
                                                        style="width:110px; height:25px"></td>

                                                <td><input name="E7" type="text" id="E7" value="2" readonly="readonly"
                                                        style="width:110px; height:25px;border-width: 0px; font-size:15px; border-style: inset">
                                                </td>
                                                <td><input name="E8" type="text" id="E8" value="35" readonly="readonly"
                                                        style="width:110px; height:25px;border-width: 0px; font-size:15px; border-style: inset">
                                                </td>
                                                <td><input name="E9" type="text" id="E9" onkeyup="WupperCase(this)"
                                                        onchange="SetDigitalInputE(9);"
                                                        style="width:110px; height:25px"></td>
                                                <td><input name="E10" type="text" id="E10" readonly="readonly"
                                                        style="width:110px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="E11" type="text" id="E11" readonly="readonly"
                                                        style="width:110px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="c-content-panel instrument-dependent">
                        <div class="c-label"> 1.5 温度示值误差</div>
                        <div class="c-body">
                            <div class="row">
                                <div class="col-md-12">
                                    <table class="table">
                                        <tbody>
                                            <tr>
                                                <th>温度(℃)</th>
                                                <th>标准温度计<br>示值T(℃)</th>
                                                <th>仪器温度<br>示值TM(℃)</th>
                                                <th>温度<br>示值误差△T(℃)</th>
                                                <th>示值误差<br>平均值(℃)</th>
                                            </tr>

                                            <tr>
                                                <td><input name="F0" type="text" id="F0" readonly="readonly" value="25"
                                                        style="width:110px; height:25px;border-width: 0px; font-size:15px; border-style: inset">
                                                </td>
                                                <td><input name="F1" type="text" id="F1" onkeyup="WupperCase(this)"
                                                        value="/" style="width:110px; height:25px"></td>
                                                <td><input name="F2" type="text" id="F2" onkeyup="WupperCase(this)"
                                                        value="/" onchange="SetDigitalInputF(2);"
                                                        style="width:110px; height:25px"></td>
                                                <td><input name="F3" type="text" id="F3" readonly="readonly" value="/"
                                                        style="width:110px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="F4" type="text" id="F4" readonly="readonly" value="/"
                                                        style="width:110px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                            </tr>
                                            <tr>
                                                <td> <input name="F5" type="text" id="F5" readonly="readonly" value="25"
                                                        style="width:110px; height:25px;border-width: 0px; font-size:15px; border-style: inset">
                                                </td>
                                                <td><input name="F6" type="text" id="F6" onkeyup="WupperCase(this)"
                                                        value="/" style="width:110px; height:25px"> </td>
                                                <td><input name="F7" type="text" id="F7" onkeyup="WupperCase(this)"
                                                        value="/" onchange="SetDigitalInputF(7);"
                                                        style="width:110px; height:25px"> </td>
                                                <td><input name="F8" type="text" id="F8" readonly="readonly" value="/"
                                                        style="width:110px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="F9" type="text" id="F9" readonly="readonly" value="/"
                                                        style="width:110px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>

                                            </tr>
                                            <tr>
                                                <td><input name="F10" type="text" id="F10" readonly="readonly"
                                                        value="25"
                                                        style="width:110px; height:25px;border-width: 0px; font-size:15px; border-style: inset">
                                                </td>
                                                <td><input name="F11" type="text" id="F11" onkeyup="WupperCase(this)"
                                                        value="/" style="width:110px; height:25px"></td>
                                                <td><input name="F12" type="text" id="F12" onkeyup="WupperCase(this)"
                                                        value="/" onchange="SetDigitalInputF(12);"
                                                        style="width:110px; height:25px"> </td>
                                                <td> <input name="F13" type="text" id="F13" readonly="readonly"
                                                        value="/"
                                                        style="width:110px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="F14" type="text" id="F14" readonly="readonly" value="/"
                                                        style="width:110px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>

                                            </tr>

                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="c-content-panel instrument-dependent">
                        <div class="c-label"> 1.6 仪器引用误差</div>
                        <div class="c-body">
                            <div class="row">
                                <div class="col-md-12">
                                    <table class="table">

                                        <tbody>
                                            <tr>
                                                <th rowspan="2">类别</th>
                                                <th rowspan="2">量程上限值<br>kF(μS/cm)</th>
                                                <th rowspan="2">示溶液标准值<br>k(μS/cm)</th>
                                                <th colspan="4">测量值kM(μS/cm)</th>
                                                <th rowspan="2">电导池常数<br>Kcell(cm-1)</th>
                                                <th rowspan="2">常数平均值<br>Kcell(cm-1)</th>
                                                <th rowspan="2">引用误差<br>△k/kF(%FS)</th>

                                            </tr>
                                            <tr>

                                                <td align="center">1</td>
                                                <td align="center">2</td>
                                                <td align="center">3</td>
                                                <td align="center">平均</td>

                                            </tr>
                                            <tr>
                                                <td rowspan="2"><input name="BB0" type="text" id="BB0" value="校准"
                                                        style="width:50px; height:25px;border-width: 0px; font-size:15px; border-style: inset">
                                                </td>
                                                <td><input name="B11" type="text" id="B11" onkeyup="WupperCase(this)"
                                                        value="/" style="width:90px; height:25px"></td>
                                                <td> <input name="B12" type="text" id="B12" onkeyup="WupperCase(this)"
                                                        value="/" style="width:90px; height:25px"></td>
                                                <td><input name="B13" type="text" id="B13" onkeyup="WupperCase(this)"
                                                        value="/" style="width:70px; height:25px"> </td>
                                                <td><input name="B14" type="text" id="B14" onkeyup="WupperCase(this)"
                                                        value="/" style="width:70px; height:25px"> </td>
                                                <td><input name="B15" type="text" id="B15" onkeyup="WupperCase(this)"
                                                        value="/" onchange="SetDigitalInputBB(15);"
                                                        style="width:70px; height:25px"> </td>
                                                <td><input name="B16" type="text" id="B16" readonly="readonly" value="/"
                                                        style="width:70px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="B17" type="text" id="B17" readonly="readonly" value="/"
                                                        style="width:90px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="B18" type="text" id="B18" readonly="readonly" value="/"
                                                        style="width:90px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="B19" type="text" id="B19" readonly="readonly" value="/"
                                                        style="width:90px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                            </tr>
                                            <tr>

                                                <td><input name="B20" type="text" id="B20" onkeyup="WupperCase(this)"
                                                        value="/" style="width:90px; height:25px"></td>
                                                <td> <input name="B21" type="text" id="B21" onkeyup="WupperCase(this)"
                                                        value="/" style="width:90px; height:25px"></td>
                                                <td><input name="B22" type="text" id="B22" onkeyup="WupperCase(this)"
                                                        value="/" style="width:70px; height:25px"> </td>
                                                <td><input name="B23" type="text" id="B23" onkeyup="WupperCase(this)"
                                                        value="/" style="width:70px; height:25px"> </td>
                                                <td><input name="B24" type="text" id="B24" onkeyup="WupperCase(this)"
                                                        value="/" onchange="SetDigitalInputBB(24);"
                                                        style="width:70px; height:25px"> </td>
                                                <td><input name="B25" type="text" id="B25" readonly="readonly" value="/"
                                                        style="width:70px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="B26" type="text" id="B26" readonly="readonly" value="/"
                                                        style="width:90px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="B27" type="text" id="B27" readonly="readonly" value="/"
                                                        style="width:90px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="B28" type="text" id="B28" readonly="readonly" value="/"
                                                        style="width:90px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                            </tr>
                                            <tr>
                                                <td rowspan="2"><input name="BB1" type="text" id="BB1" value="测量"
                                                        style="width:50px; height:25px;border-width: 0px; font-size:15px; border-style: inset">
                                                </td>
                                                <td><input name="B29" type="text" id="B29" onkeyup="WupperCase(this)"
                                                        value="/" style="width:90px; height:25px"></td>
                                                <td><input name="B30" type="text" id="B30" onkeyup="WupperCase(this)"
                                                        value="/" style="width:90px; height:25px"></td>
                                                <td> <input name="B31" type="text" id="B31" onkeyup="WupperCase(this)"
                                                        value="/" style="width:70px; height:25px"></td>
                                                <td><input name="B32" type="text" id="B32" onkeyup="WupperCase(this)"
                                                        value="/" style="width:70px; height:25px"> </td>
                                                <td><input name="B33" type="text" id="B33" onkeyup="WupperCase(this)"
                                                        value="/" onchange="SetDigitalInputBB(33);"
                                                        style="width:70px; height:25px"> </td>
                                                <td><input name="B34" type="text" id="B34" readonly="readonly" value="/"
                                                        style="width:70px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="B35" type="text" id="B35" readonly="readonly" value="/"
                                                        style="width:90px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="B36" type="text" id="B36" readonly="readonly" value="/"
                                                        style="width:90px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="B37" type="text" id="B37" readonly="readonly" value="/"
                                                        style="width:90px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>

                                            </tr>
                                            <tr>
                                                <td><input name="B38" type="text" id="B38" onkeyup="WupperCase(this)"
                                                        value="/" style="width:90px; height:25px"> </td>
                                                <td><input name="B39" type="text" id="B39" onkeyup="WupperCase(this)"
                                                        value="/" style="width:90px; height:25px"></td>
                                                <td> <input name="B40" type="text" id="B40" onkeyup="WupperCase(this)"
                                                        value="/" style="width:70px; height:25px"></td>
                                                <td><input name="B41" type="text" id="B41" onkeyup="WupperCase(this)"
                                                        value="/" style="width:70px; height:25px"> </td>
                                                <td><input name="B42" type="text" id="B42" onkeyup="WupperCase(this)"
                                                        value="/" onchange="SetDigitalInputBB(42);"
                                                        style="width:70px; height:25px"> </td>
                                                <td><input name="B43" type="text" id="B43" readonly="readonly" value="/"
                                                        style="width:70px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="B44" type="text" id="B44" readonly="readonly" value="/"
                                                        style="width:90px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="B45" type="text" id="B45" readonly="readonly" value="/"
                                                        style="width:90px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="B46" type="text" id="B46" readonly="readonly" value="/"
                                                        style="width:90px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>

                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="c-content-panel instrument-dependent">
                        <div class="c-label"> 1.7 仪器重复性</div>
                        <div class="c-body">
                            <div class="row">
                                <div class="col-md-12">
                                    <table class="table">

                                        <tbody>
                                            <tr>
                                                <th rowspan="2">池常数Kcell(cm-1)</th>
                                                <th rowspan="2">量程上限值<br>kF(μS/cm)</th>
                                                <th colspan="6">仪器测量值kM</th>
                                                <th rowspan="2">测量平均值<br>kM(μS/cm)</th>
                                                <th rowspan="2">标准偏差<br>S</th>
                                                <th rowspan="2">标准偏差<br>S/kF(%FS)</th>
                                            </tr>
                                            <tr>
                                                <td>1</td>
                                                <td>2</td>
                                                <td>3</td>
                                                <td>4</td>
                                                <td>5</td>
                                                <td>6</td>
                                            </tr>
                                            <tr>
                                                <td><input name="H0" type="text" id="H0" onkeyup="WupperCase(this)"
                                                        value="/" style="width:110px; height:25px;"></td>
                                                <td><input name="H1" type="text" id="H1" onkeyup="WupperCase(this)"
                                                        value="/" style="width:70px; height:25px"></td>
                                                <td><input name="H2" type="text" id="H2" onkeyup="WupperCase(this)"
                                                        value="/" style="width:70px; height:25px"></td>
                                                <td><input name="H3" type="text" id="H3" onkeyup="WupperCase(this)"
                                                        value="/" style="width:70px; height:25px"></td>
                                                <td><input name="H4" type="text" id="H4" onkeyup="WupperCase(this)"
                                                        value="/" style="width:70px; height:25px"></td>
                                                <td><input name="H5" type="text" id="H5" onkeyup="WupperCase(this)"
                                                        value="/" style="width:70px; height:25px"></td>
                                                <td><input name="H6" type="text" id="H6" onkeyup="WupperCase(this)"
                                                        value="/" style="width:70px; height:25px"></td>
                                                <td><input name="H7" type="text" id="H7" onkeyup="WupperCase(this)"
                                                        value="/" onchange="SetDigitalInputH(7);"
                                                        style="width:70px; height:25px"></td>
                                                <td><input name="H8" type="text" id="H8" readonly="readonly" value="/"
                                                        style="width:70px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="H9" type="text" id="H9" readonly="readonly" value="/"
                                                        style="width:70px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>
                                                <td><input name="H10" type="text" id="H10" readonly="readonly" value="/"
                                                        style="width:70px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3">
                                                </td>

                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="c-content-panel">
                        <div class="c-label">本次仪器校准结果的扩展不确定度(pH): (<i>k</i>=2)</div>
                        <div class="c-body">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="table-responsive">
                                        <table class="table">
                                            <tbody>
                                                <tr>
                                                    <th>电计(%FS):<i>U</i>=</th>
                                                    <th>仪器(%FS):<i>U</i>=</th>
                                                </tr>
                                                <tr>
                                                    <td><input name="K0" type="text" id="K0" 
                                                            style="width:110px; height:25px"></td>
                                                    <td><input name="K1" type="text" id="K1"
                                                            style="width:110px; height:25px"></td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                    <div class="table-responsive">
                                        <table class="table table-bordered">

                                            <tbody>
                                                <tr>
                                                    <th>校准员：</th>
                                                    <td><input name="calibrator" type="text" id="calibrator"
                                                            style="width:110px; height:25px;border-width: 0.5px; border-style: inset; background-color: #F3F3F3"
                                                            value="{{ windows_user }}"></td>
                                                    <th>核验员</th>
                                                    <td><input name="inspector_Users" type="text" id="inspector_Users"
                                                            style="width:110px; height:25px"></td>

                                                </tr>

                                            </tbody>
                                        </table>
                                        <div class="S001">
                                            <br>
                                            <table>
                                                <tbody>
                                                    <tr>
                                                        <td colspan="5" align="center">
                                                            <input type="submit" name="Button2" value="提交校准"
                                                                onclick="javascript:if(Button2_onclick()==false) return false;"
                                                                id="Button2" style="width:80px;">
                                                        </td>

                                                    </tr>

                                                    <td colspan="5" align="center">
                                                        <a href="/add/" class="btn btn-default btn-xs"
                                                            style="margin-top: 10px;width: 80px;">取 消</a>
                                                    </td>
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>



    </form>



</body>

</html>

{% endblock %}

{% block js %}
    <script>
        
        // 添加处理校准项目选择的 JavaScript 函数
        function handleCalibrationSelection(selectedValue) {
            // 获取复选框元素
            var checkbox0 = document.getElementById('A1PH_Jzxm_0');
            var checkbox1 = document.getElementById('A1PH_Jzxm_1');
            
            // 根据选择设置复选框状态
            if (selectedValue === 0) {
                checkbox0.checked = true;
                checkbox1.checked = false;
            } else if (selectedValue === 1) {
                checkbox0.checked = false;
                checkbox1.checked = true;
            }
            
            // 更新隐藏字段或直接更新A1PH_Jzxm字段
            updateCalibrationFieldValue();
            
            // 根据选择显示/隐藏相关部分
            toggleInstrumentSectionDisplay();
        }

        // 添加更新字段值的函数
        function updateCalibrationFieldValue() {
            var checkbox0 = document.getElementById('A1PH_Jzxm_0');
            var checkbox1 = document.getElementById('A1PH_Jzxm_1');
            
            // 创建一个数组来存储选中的值
            var selectedValues = [];
            if (checkbox0.checked) selectedValues.push('0');
            if (checkbox1.checked) selectedValues.push('1');
            
            // 如果需要将值存储在隐藏字段中
            var hiddenField = document.getElementById('A1PH_Jzxm_hidden');
            if (hiddenField) {
                hiddenField.value = selectedValues.join(',');
            }
        }

        // 控制仪器示值误差部分的显示
        function toggleInstrumentSectionDisplay() {
                // 检查是否选择了整机示值误差(value="1")
                var yqChecked = $('#A1PH_Jzxm_1').is(':checked');
                
                // 根据选择显示或隐藏相关部分
                if (yqChecked) {
                        // 显示整机示值误差相关部分
                        $('.instrument-dependent').show();
                } else {
                        // 隐藏整机示值误差相关部分
                        $('.instrument-dependent').hide();
                }
        }

        $(document).ready(function () {
            var data_obj = {{ obj | safe}}

                $.each(data_obj, function (key, value) {
                        var inputSelector = $('input[name="' + key + '"]');
                        if (inputSelector.length) {
                                inputSelector.val(value);
                        }

                        $('select[name="BLPH_Bh17"]').val(data_obj["BLPH_Bh17"]);
                        $('select[name="BLPH_Bh23"]').val(data_obj["BLPH_Bh23"]);
                        $('select[name="BLPH_Bh29"]').val(data_obj["BLPH_Bh29"]);
                        $('select[name="A1PH_Level08"]').val(data_obj["A1PH_Level08"]);

                });

                // 特别处理校准项目选择
                var jzxmValue = data_obj["A1PH_Jzxm"] || "1";
                if (jzxmValue === "0") {
                        $('#A1PH_Jzxm_0').prop('checked', true);
                        $('#A1PH_Jzxm_1').prop('checked', false);
                } else if (jzxmValue === "1") {
                        $('#A1PH_Jzxm_0').prop('checked', false);
                        $('#A1PH_Jzxm_1').prop('checked', true);
                }

                // 调用显示控制函数
                toggleInstrumentSectionDisplay();

                $('#tools tr:gt(0)').each(function () {
                        $(this).find('td:eq(1) select').change(function () {
                                var selectedValue = $(this).val();
                                var title = $(this).parent().siblings().eq(0).find('input').first()
                                var range = $(this).parent().siblings().eq(1).find('input').first()
                                var certificate_number = $(this).parent().siblings().eq(2).find('input').first()
                                var end_date = $(this).parent().siblings().eq(3).find('input').first()
                                var cal_jigou = $(this).parent().siblings().eq(4).find('input').first()
                                var property = $(this).parent().siblings().eq(5).find('input').first()

                                $.ajax({
                                type: "GET",
                                url: "/tools/",  // 替换为您的URL
                                dataType: 'JSON',
                                data: {
                                        'value': selectedValue,
                                },
                                success: function (data) {
                                        // 假设返回的数据填充到input
                                        var n = data.datalist;
                                        title.val(n[0].fields.title);
                                        range.val(n[0].fields.range);
                                        certificate_number.val(n[0].fields.certificate_number);
                                        end_date.val(n[0].fields.end_date);
                                        cal_jigou.val(n[0].fields.cal_jigou);
                                        property.val(n[0].fields.property);
                                }
                                });
                        });

                });


        })
    </script>





<script src="/static/bootstrap/js/jquery.min.js" type="text/javascript"></script>
<script>

    $(document).ready(function () {
        var data_obj = {{ obj | safe }}

        $.each(data_obj, function (key, value) {
            var inputSelector = $('input[name="' + key + '"]');
            if (inputSelector.length) {
                inputSelector.val(value);
            }

            $('select[name="BLPH_Bh17"]').val(data_obj["BLPH_Bh17"]);
        });
        })

</script>

{% endblock %}